[V0 Deprecation] Remove unused classes in attention#25541
Conversation
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
There was a problem hiding this comment.
Code Review
This pull request is a great cleanup effort, removing a significant amount of deprecated V0 attention code. The changes are mostly correct and consistent. However, I found one critical issue in vllm/v1/attention/backends/pallas.py where the PallasAttentionBackend class fails to implement an abstract method from its base class, which will lead to a TypeError at runtime. Please see my comment for the details and a suggested fix.
| @@ -97,10 +96,6 @@ def get_impl_cls() -> type["PallasAttentionBackendImpl"]: | |||
| def get_metadata_cls() -> type["PallasMetadata"]: | |||
| return PallasMetadata | |||
|
|
|||
There was a problem hiding this comment.
The abstract method get_builder_cls is defined in the base class AttentionBackend, but it's not implemented in PallasAttentionBackend. This will cause a TypeError when trying to instantiate PallasAttentionBackend. Since the Pallas backend does not use a metadata builder, you should add an implementation that raises NotImplementedError.
@staticmethod
def get_builder_cls():
raise NotImplementedError("Pallas backend does not use a metadata builder.")vllm-project/vllm#25541 --------- Signed-off-by: Chendi Xue <Chendi.Xue@intel.com>
vllm-project/vllm#25541 --------- Signed-off-by: Chendi Xue <Chendi.Xue@intel.com> Signed-off-by: Kavulya, Soila P <soila.p.kavulya@intel.com>
vllm-project/vllm#25541 --------- Signed-off-by: Chendi Xue <Chendi.Xue@intel.com> Signed-off-by: Iryna Boiko <iboiko@habana.ai>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Woosuk Kwon <woosuk@thinkingmachines.ai> Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Woosuk Kwon <woosuk@thinkingmachines.ai>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Woosuk Kwon <woosuk@thinkingmachines.ai>
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu> Signed-off-by: Woosuk Kwon <woosuk@thinkingmachines.ai>
No description provided.